package com.itsq.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author 史先帅
 * @since 2021-01-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("usage_record")
@ApiModel(value="UsageRecord对象", description="")
public class UsageRecord implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "使用记录表id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "汽车id")
    @TableField("car_id")
    private Integer carId;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "用户名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "事由")
    @TableField("reason")
    private String reason;

    @ApiModelProperty(value = "耗时")
    @TableField("minutes")
    private float minutes;

    @ApiModelProperty(value = "费用")
    @TableField("money")
    private Double money;

    @ApiModelProperty(value = "起始时间")
    @TableField(value = "cre_date",fill = FieldFill.INSERT)
    private Date creDate;

    @ApiModelProperty(value = "结束时间")
    @TableField(value = "end_date")
    private Date endDate;

    @ApiModelProperty(value = "当前状态")
    @TableField("states")
    private Integer states;


    @ApiModelProperty(value = "状态")
    @TableField("state")
    @TableLogic
    private Integer state;

    @ApiModelProperty(value = "所属公司名")
    @TableField("company")
    private String company;

    public static final String ID = "id";

    public static final String CAR_ID = "car_id";

    public static final String USER_ID = "user_id";

    public static final String USER_NAME = "user_name";

    public static final String MINUTES = "minutes";

    public static final String MONEY = "money";

    public static final String CRE_DATE = "cre_date";

    public static final String END_DATE = "end_date";

    public static final String STATE = "state";

    public static final String STATES = "states";

    public static final String COMPANY = "company";

}
